Skip to content

Small fixes for A/B testing from feedback#1258

Merged
bnmnetp merged 2 commits into
RunestoneInteractive:mainfrom
sethbern:ab-fixes
Jun 26, 2026
Merged

Small fixes for A/B testing from feedback#1258
bnmnetp merged 2 commits into
RunestoneInteractive:mainfrom
sethbern:ab-fixes

Conversation

@sethbern

Copy link
Copy Markdown
Contributor

I tested this with the peer instruction grant group and everything worked as expected. The only change is that students who didn't vote still stay in the same group as the people they talked to. Before, they could accidentally get split up which would not be the desired outcome for the experiment.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the A/B assignment logic in the peer-instruction pairing endpoint so students remain in the same experimental condition as their recorded in-person (verbal) partners, even when some partners did not submit a vote for the current question.

Changes:

  • Build verbal-discussion clusters using the full recorded peergroup membership (not just current answerers).
  • Persist experiment assignments for all clustered students (including non-voters), so partners always share a condition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bases/rsptx/assignment_server_api/routers/peer.py Outdated
Comment thread bases/rsptx/assignment_server_api/routers/peer.py
Comment thread bases/rsptx/assignment_server_api/routers/peer.py Outdated
@bnmnetp

bnmnetp commented Jun 25, 2026

Copy link
Copy Markdown
Member

The grammar fixes are an easy accept I think. The only one I have curiosity about is the double call to grp.add(p ) which just seems like an easy fix also?

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sethbern

Copy link
Copy Markdown
Contributor Author

Yeah I agree these are all easy accepts.

@bnmnetp

bnmnetp commented Jun 26, 2026

Copy link
Copy Markdown
Member

Thanks. Will merge now.

The only improvement Claude recommended was to refactor the make_pairs endpoint to use a helper function to do the clustering so that we could write unit tests against it. That may be something to do if we have further issues or the next time we need to refine the clustering.

@bnmnetp bnmnetp merged commit fcb58f0 into RunestoneInteractive:main Jun 26, 2026
2 checks passed
@bnmnetp

bnmnetp commented Jun 26, 2026

Copy link
Copy Markdown
Member

Or maybe I'll have claude do that and see what it looks like...

@sethbern sethbern deleted the ab-fixes branch June 26, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants